﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;

//using System.Management.Automation;

//using ESF.MUP.BasePlatform;
//using ESF.MUP.BasePlatform.Services;
//using ESF.MUP.BasePlatform.Domain.Model;
//using ESF.MUP.BasePlatform.ApplicationServices.Interfaces;
////using ESF.MUP.BasePlatform.DbService;
////using ESF.MUP.BasePlatform.DbService.MSSQL;

//using Microsoft.Practices.Unity;

//namespace ESF.MUP.Powershell
//{
//    [Cmdlet(VerbsCommon.Add, "Endpoint")]
//    public class AddEndpoint:Cmdlet
//    {

//        [Parameter()]
//        public String Name { get; set; }


//        [Parameter()]
//        public String ServiceName { get; set; }


//        [Parameter()]
//        public String ConnectionDefinition { get; set; }

//        protected override void ProcessRecord()
//        {
//            string file=@"D:\Tools\MESF\Main\MiddlewareManager\ESF.MUP.Powershell\unity.config";
//            ESF.MUP.BasePlatform.MiddlewareManagementService.Current.LoadBaseConfiguration(file);

//            IApplicationService appSvc = MiddlewareManagementService.Current.GetApplicationService();
//            List<Application> apps = appSvc.GetAll();
//            this.WriteObject(apps);

//            //UnityContainer container = new UnityContainer();
//            //container.RegisterType<System.Data.Common.DbConnection, System.Data.SqlClient.SqlConnection>(new InjectionConstructor(@"data source=.\ESF;initial catalog=CustomerRepository;integrated security=True"));


//            //container.RegisterType<IUnitOfWork, SqlContext>();

//            //IUnitOfWork ctx = container.Resolve<IUnitOfWork>();

//            //container.RegisterType<IRepository<Application>, ApplicationRepository>(new InjectionConstructor(typeof(SqlContext)));

//            //IRepository<Application> app = container.Resolve<IRepository<Application>>();

//            //container.RegisterType<IApplicationService, ApplicationManagementService>(new InjectionConstructor(app));

//            //IApplicationService appSvc2 = container.Resolve<IApplicationService>();
            



//        }
//    }
//}
